<!DOCTYPE html>

<html lang="zh-CN">

<head>
  
  <meta name="baidu-site-verification" content="code-J1Qg17G6wT" />
  <title>web学习笔记3 - Js基础1 - 咔斯の小窝</title>
  <meta charset="UTF-8">
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
  
  

    <!-- Site Verification -->
    <meta name="baidu-site-verification" content="code-7bF3wXCwO5" />

  <link rel="shortcut icon" href="https://s2.loli.net/2022/07/19/xKNvsPHqcyCL37d.png" type="image/png" />
  <meta name="description" content="Js基础1 自学总结封面画师：唏嘘的星辰  p站ID：13312138">
<meta property="og:type" content="article">
<meta property="og:title" content="web学习笔记3 - Js基础1">
<meta property="og:url" content="https://blog.kassama.top/webNotes3.html">
<meta property="og:site_name" content="咔斯の小窝">
<meta property="og:description" content="Js基础1 自学总结封面画师：唏嘘的星辰  p站ID：13312138">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-03-28T12:35:00.000Z">
<meta property="article:modified_time" content="2023-03-07T08:00:31.087Z">
<meta property="article:author" content="咔斯Sama">
<meta property="article:tag" content="HTML">
<meta property="article:tag" content="web">
<meta name="twitter:card" content="summary">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/combine/npm/highlight.js@9.15.8/styles/atom-one-dark.css,gh/theme-nexmoe/hexo-theme-nexmoe@latest/source/lib/mdui_043tiny/css/mdui.css,gh/theme-nexmoe/hexo-theme-nexmoe@latest/source/lib/iconfont/iconfont.css,gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css?v=233" crossorigin>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/justifiedGallery@3.8.1/dist/css/justifiedGallery.min.css">
  
    <link rel="stylesheet" href="//at.alicdn.com/t/font_2421060_cksn56jaae6.css">
  
  <link rel="stylesheet" href="/css/style.css?v=1695462045753">
<meta name="generator" content="Hexo 6.1.0"></head>

<body class="mdui-drawer-body-left">
  
  <div id="nexmoe-background">
    <div class="nexmoe-bg" style="background-image: url(https://cdn.jsdelivr.net/gh/kasisama/Blog_images/background/bk1.webp)"></div>
    <div class="nexmoe-small" style="background-image: url(https://s2.loli.net/2022/07/19/QDhWb3BqyXLcdF8.png)"></div>
    <div class="mdui-appbar mdui-shadow-0">
      <div class="mdui-toolbar">
        <a mdui-drawer="{target: '#drawer', swipe: true}" title="menu" class="mdui-btn mdui-btn-icon mdui-ripple"><i class="mdui-icon nexmoefont icon-menu"></i></a>
        <div class="mdui-toolbar-spacer"></div>
        <!--<a href="javascript:;" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">search</i></a>-->
        <a href="/" title="咔斯Sama" class="mdui-btn mdui-btn-icon"><img src="https://cdn.jsdelivr.net/gh/kasisama/Blog_images/background/kasi.webp" alt="咔斯Sama"></a>
       </div>
    </div>
  </div>
  <div id="nexmoe-header">
      <div class="nexmoe-drawer mdui-drawer" id="drawer">
    <div class="nexmoe-avatar mdui-ripple">
        <a href="/" title="咔斯Sama">
            <img src="https://cdn.jsdelivr.net/gh/kasisama/Blog_images/background/kasi.webp" alt="咔斯Sama" alt="咔斯Sama">
        </a>
    </div>
    <div class="nexmoe-count">
        <div id="ks-articlesBtn" class="nexmoe-count-item"><span>文章</span>32 <div class="item-radius"></div><div class="item-radius item-right"></div> </div>
        <div id="ks-tagsBtn" class="nexmoe-count-item"><span>标签</span>14<div class="item-radius"></div><div class="item-radius item-right"></div></div>
        <div id="ks-categoriesBtn" class="nexmoe-count-item"><span>分类</span>6<div class="item-radius"></div><div class="item-radius item-right"></div></div>
    </div>
    <div class="nexmoe-list mdui-list" mdui-collapse="{accordion: true}">
        
        <a class="nexmoe-list-item mdui-list-item mdui-ripple" href="/" title="回到首页">
            <i class="mdui-list-item-icon nexmoefont icon-meishi"></i>
            <div class="mdui-list-item-content">
                回到首页
            </div>
        </a>
        
        <a class="nexmoe-list-item mdui-list-item mdui-ripple" href="/archives.html" title="文章归档">
            <i class="mdui-list-item-icon nexmoefont icon-hanbao1"></i>
            <div class="mdui-list-item-content">
                文章归档
            </div>
        </a>
        
        <a class="nexmoe-list-item mdui-list-item mdui-ripple" href="/friend.html" title="我的朋友">
            <i class="mdui-list-item-icon nexmoefont icon-cola"></i>
            <div class="mdui-list-item-content">
                我的朋友
            </div>
        </a>
        
        <a class="nexmoe-list-item mdui-list-item mdui-ripple" href="/photos.html" title="咔斯相册">
            <i class="mdui-list-item-icon nexmoefont icon-tuchong"></i>
            <div class="mdui-list-item-content">
                咔斯相册
            </div>
        </a>
        
        <a class="nexmoe-list-item mdui-list-item mdui-ripple" href="/about.html" title="关于咔斯">
            <i class="mdui-list-item-icon nexmoefont icon-jiubei1"></i>
            <div class="mdui-list-item-content">
                关于咔斯
            </div>
        </a>
        
    </div>
    <aside id="nexmoe-sidebar">
  
  
<!-- 站内搜索 -->

<div class="nexmoe-widget-wrap">
    <div class="nexmoe-widget nexmoe-search" >
        <form id="search-form">
            <label><input type="text" id="local-search-input" name="q" results="0" placeholder="站内搜索" class="input form-control" autocomplete="off" autocorrect="off"/></label>
            <!-- 清空/重置搜索框 -->
            <i class="fa fa-times" onclick="resetSearch()"></i>
        </form>
    </div>
    <div id="local-search-result"></div> <!-- 搜索结果区 -->
    <!-- <p class='no-result'></p> 无匹配时显示，注意在 CSS 中设置默认隐藏 -->
</div>


  
  <div class="nexmoe-widget-wrap">
    <div class="nexmoe-widget nexmoe-social">
        <a class="mdui-ripple" href="http://wpa.qq.com/msgrd?v=3&uin=1347993953&site=qq&menu=yes" target="_blank" mdui-tooltip="{content: 'QQ'}" style="color: rgb(64, 196, 255);background-color: rgba(64, 196, 255, .1);">
            <i class="nexmoefont icon-QQ"></i>
        </a><a class="mdui-ripple" href="https://steamcommunity.com/id/kasiwuhui/" target="_blank" mdui-tooltip="{content: 'steam'}" style="color: rgb(14, 71, 161);background-color: rgba(14, 71, 161, .15);">
            <i class="nexmoefont icon-steam"></i>
        </a><a class="mdui-ripple" href="mailto:kasiwuhui@vip.qq.com" target="_blank" mdui-tooltip="{content: 'mail'}" style="color: rgb(249,8,8);background-color: rgba(249,8,8,.1);">
            <i class="nexmoefont icon-mail-fill"></i>
        </a><a class="mdui-ripple" href="https://space.bilibili.com/93548600" target="_blank" mdui-tooltip="{content: '哔哩哔哩'}" style="color: rgb(231, 106, 141);background-color: rgba(231, 106, 141, .15);">
            <i class="nexmoefont icon-bilibili"></i>
        </a><a class="mdui-ripple" href="https://github.com/kasisama/" target="_blank" mdui-tooltip="{content: 'GitHub'}" style="color: rgb(25, 23, 23);background-color: rgba(25, 23, 23, .15);">
            <i class="nexmoefont icon-github"></i>
        </a><a class="mdui-ripple" href="https://gitee.com/kassama" target="_blank" mdui-tooltip="{content: 'gitee'}" style="color: rgb(199, 29, 35);background-color: rgba(199, 29, 35, .15);">
            <i class="nexmoefont icon-mayun"></i>
        </a>
    </div>
</div>
  
  
  <div class="nexmoe-widget-wrap">
    <div id="randomtagcloud" class="nexmoe-widget tagcloud nexmoe-rainbow">
      <a href="/tags/CDN/" style="font-size: 10px;">CDN</a> <a href="/tags/HTML/" style="font-size: 20px;">HTML</a> <a href="/tags/Linux/" style="font-size: 12.5px;">Linux</a> <a href="/tags/NodeJs/" style="font-size: 12.5px;">NodeJs</a> <a href="/tags/QWQ/" style="font-size: 10px;">QWQ</a> <a href="/tags/Ubuntu/" style="font-size: 12.5px;">Ubuntu</a> <a href="/tags/Vue/" style="font-size: 15px;">Vue</a> <a href="/tags/web/" style="font-size: 17.5px;">web</a> <a href="/tags/wiki/" style="font-size: 12.5px;">wiki</a> <a href="/tags/%E5%8D%9A%E5%AE%A2/" style="font-size: 10px;">博客</a> <a href="/tags/%E5%92%94%E6%96%AF/" style="font-size: 10px;">咔斯</a> <a href="/tags/%E5%92%94%E6%96%AF%E5%A8%B1%E4%B9%90/" style="font-size: 10px;">咔斯娱乐</a> <a href="/tags/%E5%AE%A0%E7%89%A9%E5%85%BB%E6%88%90/" style="font-size: 12.5px;">宠物养成</a> <a href="/tags/%E6%9C%8D%E5%8A%A1%E6%9D%A1%E6%AC%BE/" style="font-size: 10px;">服务条款</a>
    </div>
    
  </div>

  
  
  <div class="nexmoe-widget-wrap">
    <h3 class="nexmoe-widget-title">文章分类</h3>
    <div class="nexmoe-widget">

      <ul class="category-list">

        


        

        

        <li class="category-list-item">
          <a class="category-list-link" href="/categories/web笔记/">web笔记</a>
          <span class="category-list-count">23</span>
        </li>

        

        <li class="category-list-item">
          <a class="category-list-link" href="/categories/wiki/">wiki</a>
          <span class="category-list-count">2</span>
        </li>

        

        <li class="category-list-item">
          <a class="category-list-link" href="/categories/公告/">公告</a>
          <span class="category-list-count">1</span>
        </li>

        

        <li class="category-list-item">
          <a class="category-list-link" href="/categories/备忘/">备忘</a>
          <span class="category-list-count">1</span>
        </li>

        

        <li class="category-list-item">
          <a class="category-list-link" href="/categories/日志/">日志</a>
          <span class="category-list-count">4</span>
        </li>

        

        <li class="category-list-item">
          <a class="category-list-link" href="/categories/遇坑记录/">遇坑记录</a>
          <span class="category-list-count">1</span>
        </li>

        
      </ul>

    </div>
  </div>


  
  
  <div class="nexmoe-widget-wrap">
    <h3 class="nexmoe-widget-title">文章归档</h3>
    <div class="nexmoe-widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/">2022</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/">2021</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/">2020</a><span class="archive-list-count">20</span></li></ul>
    </div>
  </div>


<style>
.nexmoe-widget .archive-list-count{
	position : absolute;
	right: 15px;
	top:9px;
	color: #DDD;
}
</style>

  
</aside>
    <div class="nexmoe-copyright">
        &copy; 2023 咔斯Sama
        Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
        & <a href="https://github.com/theme-nexmoe/hexo-theme-nexmoe" target="_blank">Nexmoe</a><br/>
        <a href="http://beian.miit.gov.cn" target="_blank"></a><br/>
        
        <div style="font-size: 12px">
            <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
            本站总访问量  <a id="busuanzi_value_site_pv"></a> 次<br />
            本站访客数<a id="busuanzi_value_site_uv"></a>人次
        </div>
        
        
    </div>

</div><!-- .nexmoe-drawer -->

  </div>
  <div id="nexmoe-content">
    <div class="nexmoe-primary">
        <div class="nexmoe-post">
    
        <div class="nexmoe-post-cover" style="padding-bottom: 47.41666666666667%;">
            <img data-src="https://cdn.jsdelivr.net/gh/kasisama/Blog_images/Otherimgage/webLearn.webp" data-sizes="auto" alt="web学习笔记3 - Js基础1" class="lazyload">
            <h1>web学习笔记3 - Js基础1</h1>
        </div>
    

        <div class="nexmoe-post-meta nexmoe-rainbow" style="margin:10px 0!important;">
    <a><i class="nexmoefont icon-calendar-fill"></i>2020年03月28日</a>
    <a><i class="nexmoefont icon-areachart"></i>1.9k 字</a>
    <a><i class="nexmoefont icon-time-circle-fill"></i>大概 9 分钟</a>
</div>


        <article>
            <p>Js基础1 自学总结<br>封面画师：唏嘘的星辰  p站ID：13312138</p>
<span id="more"></span>
<h2 id="js更改样式"><a href="#js更改样式" class="headerlink" title="js更改样式"></a>js更改样式</h2><pre><code class="highlight html"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;d1&quot;</span>&gt;</span>更改样式<span class="tag">&lt;/<span class="name">div</span>&gt;</span>
<span class="comment">&lt;!-- onclick 当点击的时候， changeStyle() 点击执行changeStyle功能--&gt;</span>
<span class="tag">&lt;<span class="name">button</span> <span class="attr">onclick</span>=<span class="string">&quot;changeStyle()&quot;</span>&gt;</span>点击更改样式<span class="tag">&lt;/<span class="name">button</span>&gt;</span>
<span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span>
<span class="language-javascript">    </span>
<span class="language-javascript"><span class="comment">//  定义函数</span></span>
<span class="language-javascript"><span class="keyword">function</span> <span class="title function_">changeStyle</span>(<span class="params"></span>)&#123;</span>
<span class="language-javascript">    <span class="comment">// 1查找div元素 通过函数进行查找的 document 文档，getElementById() 通过id获取元素</span></span>
<span class="language-javascript">    <span class="comment">// .style 添加行内样式 ; .color 字体颜色；</span></span>
<span class="language-javascript">    <span class="comment">// document.getElementById(&quot;d1&quot;).style.color=&quot;red&quot;</span></span>
<span class="language-javascript"></span>
<span class="language-javascript">    <span class="comment">// 2 如果标签设置了id，js可以简单通过id直接获取标签, document.getElementById (&quot;d1&quot;) 类似于 d1</span></span>
<span class="language-javascript">    d1.<span class="property">style</span>.<span class="property">color</span>=<span class="string">&quot;red&quot;</span></span>
<span class="language-javascript">&#125;</span>
<span class="language-javascript"></span>
<span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></code></pre>

<h2 id="流程控制语句"><a href="#流程控制语句" class="headerlink" title="流程控制语句"></a>流程控制语句</h2><p><code>if</code> : 条件控制语句<br><code>switch...case</code> : 条件控制语句<br><code>for</code> : 循环控制语句<br><code>do...while</code> : 循环语句<br><code>while</code> : 循环语句<br><code>try...catch...finally</code> : 语句用于处理代码中可能出现的错误信息</p>
<h3 id="if判断"><a href="#if判断" class="headerlink" title="if判断"></a>if判断</h3><ol>
<li><p><code>单独if条件</code> 如果条件成了 执行{代码块}</p>
 <pre><code class="highlight js"><span class="keyword">var</span> age = <span class="number">33</span>
<span class="keyword">if</span> (age&gt;<span class="number">40</span>) &#123;
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;大叔一枚&quot;</span>)
&#125;</code></pre></li>
<li><p><code>多条件判断</code><br> <code>=</code> 赋值 ，name&#x3D;”刘能” 证明name是”刘能, 非空字符串作为if条件 这个时候成立的<br> <code>==</code> 比较相等的<br> <code>===</code> 恒等的 值和类型必须都一样<br> 建议多条件判断不要使用<code>if...if</code> 弊端在于，每个<code>if</code>都会去判断，导致执行时间过长</p>
 <pre><code class="highlight js"><span class="keyword">var</span> name = <span class="string">&quot;刘德华&quot;</span>
<span class="keyword">if</span>(name==<span class="string">&quot;刘德华&quot;</span>)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;能执行到不?&quot;</span>)
    name = <span class="string">&quot;李嘉诚&quot;</span>
&#125;
<span class="keyword">if</span>(name==<span class="string">&quot;李嘉诚&quot;</span>)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;帅哥一枚&quot;</span>)
&#125;</code></pre></li>
<li><p><code>if...else</code>  如果…其他的…<br> <code>if...else...</code> 只会判断一次</p>
 <pre><code class="highlight js"><span class="keyword">var</span> score = <span class="number">80</span>
<span class="keyword">if</span>(score&gt;<span class="number">60</span>)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;我及格了&quot;</span>)
    score = <span class="number">59</span>
&#125;<span class="keyword">else</span>&#123; <span class="comment">// 相当小于等于60</span>
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;来年再战&quot;</span>)
&#125;</code></pre></li>
<li><p><code>数字作为if条件</code>，非0数字都是true都是成立，0未fasle 不成立的。</p>
 <pre><code class="highlight js"><span class="keyword">var</span> a = <span class="number">0</span>
<span class="keyword">if</span>(a)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;33333333333333333333333&#x27;</span>)
&#125;</code></pre></li>
<li><p><code>if...else if...else</code></p>
 <pre><code class="highlight js">score=<span class="number">80</span>
<span class="keyword">if</span>(score&gt;<span class="number">90</span>)&#123;
    <span class="title function_">alert</span>(<span class="string">&quot;优秀&quot;</span>)
&#125;<span class="keyword">else</span> <span class="keyword">if</span>(score&gt;=<span class="number">80</span>&amp;&amp;score&lt;=<span class="number">90</span>)&#123;
    <span class="title function_">alert</span>(<span class="string">&quot;良好&quot;</span>)
&#125;<span class="keyword">else</span>&#123;
    <span class="title function_">alert</span>(<span class="string">&quot;还凑合&quot;</span>)
&#125;</code></pre></li>
</ol>
<h3 id="Switch语句"><a href="#Switch语句" class="headerlink" title="Switch语句"></a>Switch语句</h3><pre><code class="highlight js"><span class="comment">// switch 开关 ()写判断的变量 </span>
<span class="comment">// case season 的各种情况</span>
<span class="keyword">var</span> season = <span class="string">&quot;夏&quot;</span>
<span class="keyword">switch</span> (season) &#123;
    <span class="keyword">case</span> <span class="string">&quot;春&quot;</span>: <span class="comment">//如果season==&quot;春&quot;</span>
        <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;春天万物复苏&quot;</span>)
        <span class="keyword">break</span>;  <span class="comment">// 跳出当前判断</span>

    <span class="keyword">case</span> <span class="string">&quot;夏&quot;</span>:
        <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;夏天烈日炎炎&quot;</span>)
        <span class="keyword">break</span>

    <span class="keyword">case</span> <span class="string">&quot;秋&quot;</span>:
        <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;秋天硕果累累&quot;</span>)
        <span class="keyword">break</span>

    <span class="keyword">case</span> <span class="string">&quot;冬&quot;</span>:
        <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;冬天白雪皑皑&quot;</span>)
        <span class="keyword">break</span>

    <span class="attr">default</span>:  <span class="comment">// 如果以上都不成立 执行default 默认</span>
        <span class="keyword">break</span>;</code></pre>

<h3 id="运算符号"><a href="#运算符号" class="headerlink" title="运算符号"></a>运算符号</h3><pre><code class="highlight js"><span class="comment">// 符号</span>
    <span class="keyword">var</span> a = <span class="number">10</span>
    a = a + <span class="number">10</span>    <span class="comment">// a=20</span>
    a =  a - <span class="number">10</span>   <span class="comment">// a = 10</span>
    a = a * <span class="number">10</span>   <span class="comment">// a = 100</span>
    a = a / <span class="number">10</span>   <span class="comment">// a = 10</span>
<span class="comment">//   a = a / 3    // a 带小数</span>
a = a % <span class="number">3</span>     <span class="comment">// % 求余数 1 </span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(a)

<span class="keyword">var</span> b = <span class="number">3</span>
    b+=<span class="number">3</span>   <span class="comment">// b = b+3  6</span>
    b*=<span class="number">8</span>   <span class="comment">//48  b*=8    b = b * 8</span>
    b/=<span class="number">3</span>   <span class="comment">//16</span>
    b%=<span class="number">3</span>    <span class="comment">// 1</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(b)

<span class="comment">// ++  每次加1  ，c++ 等同于 c=c+1 等同于 c+=1</span>
<span class="comment">// -- 每次减1</span>
<span class="comment">// ++ 在前 本身先加1 ，再赋值</span>
<span class="comment">// ++在后 先赋值  本身再加1</span>
<span class="keyword">var</span> c = <span class="number">30</span> 
<span class="keyword">var</span> d = c++   <span class="comment">// d =30 ,c=31</span>
    <span class="keyword">var</span> e = ++c <span class="comment">//  c = 32 ,e=32</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(c,d,e)


<span class="comment">// 比较运算符号</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="number">3</span>&gt;<span class="number">4</span>) <span class="comment">//false</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="number">3</span>&lt;=<span class="number">4</span>) <span class="comment">// true</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="number">3</span>==<span class="number">4</span>) <span class="comment">//false</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;4&quot;</span>==<span class="number">4</span>)  <span class="comment">// true 把字符串4转成数字4 再进行比较</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;4&quot;</span>===<span class="number">4</span>)  <span class="comment">//false 恒等 数字和类型都得相等</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="number">3</span>!=<span class="number">4</span>)  <span class="comment">// true</span>

<span class="comment">//逻辑运算符号</span>
<span class="comment">//  &amp;&amp; 并且  多个条件必须同时成立 才为true</span>
<span class="comment">// || 或者  只要有一个为true，整个条件都为true</span>
<span class="comment">// ! 非     取反</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="literal">true</span>&amp;&amp;<span class="literal">true</span>) <span class="comment">// true</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="literal">true</span>&amp;&amp;<span class="literal">false</span>)  <span class="comment">//fasle</span>
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="number">3</span>&gt;<span class="number">4</span>&amp;&amp;<span class="literal">true</span>)  <span class="comment">//false</span>
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="literal">true</span> || <span class="literal">false</span>)  <span class="comment">//true</span>
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="number">1</span> &amp;&amp; <span class="number">3</span>&gt;<span class="number">4</span> )  <span class="comment">//false</span>
    <span class="variable language_">console</span>.<span class="title function_">log</span>(!<span class="literal">false</span>) <span class="comment">// true</span>
    <span class="variable language_">console</span>.<span class="title function_">log</span>(!<span class="number">1</span>)  <span class="comment">//fasle</span>
    <span class="variable language_">console</span>.<span class="title function_">log</span>(!<span class="string">&quot;&quot;</span>) <span class="comment">//true</span></code></pre>

<h3 id="for循环"><a href="#for循环" class="headerlink" title="for循环"></a>for循环</h3><pre><code class="highlight js"><span class="comment">// var i = 0 循环初始值</span>
<span class="comment">//  i&lt;10 循环条件</span>
<span class="comment">//  i++ 每次i加1</span>
<span class="comment">// 先执行初始条件，再判断是否小于10，如果小于10，执行循环体，最后i的值再加1</span>
<span class="keyword">for</span>(<span class="keyword">var</span> i = <span class="number">0</span>;i&lt;<span class="number">10</span>;i++)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(i)<span class="comment">//0-9</span>
&#125;

<span class="comment">// 如果改变循环次数的时候</span>
<span class="comment">// 1 改循环条件</span>
<span class="keyword">for</span>(<span class="keyword">var</span> i = <span class="number">0</span>;i&lt;<span class="number">5</span>;i++)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(i)  <span class="comment">// 0-4</span>
&#125;

<span class="comment">// 2 改循环初始值</span>
<span class="keyword">for</span>(<span class="keyword">var</span> i = <span class="number">5</span>;i&lt;<span class="number">10</span>;i++)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(i)  <span class="comment">// 5-9</span>
&#125;

<span class="comment">// 3 改递增值</span>
<span class="comment">// i+2  表达式  没有赋值</span>
<span class="comment">// i+=2 i=i+2  把加的结果赋值给i</span>
<span class="keyword">for</span>(<span class="keyword">var</span> i = <span class="number">0</span>;i&lt;<span class="number">10</span>;i+=<span class="number">2</span>)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(i)  <span class="comment">// 0 2 4 6 8</span>
&#125;

<span class="comment">// for非常规的操作1 for循环是同步执行的，执行完for之后才会往下执行，阻塞代码的执行</span>
<span class="comment">// for(var i = 0;i&lt;999999999;i++)&#123;</span>
<span class="comment">//     console.log(i)</span>
<span class="comment">// &#125;</span>
<span class="comment">// alert(10000)</span>


<span class="comment">// 非常规的操作2 写成一个死循环</span>
<span class="keyword">for</span>(<span class="keyword">var</span> i =<span class="number">0</span>;i&lt;<span class="number">10</span>;i--)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(i+<span class="string">&quot;-----------&quot;</span>)  <span class="comment">// 0  -1 -2 -3 -4</span>
    <span class="keyword">if</span>(i==-<span class="number">4</span>)&#123;  <span class="comment">//当i==-4时候 执行break</span>
        <span class="keyword">break</span> <span class="comment">// 跳出循环体 循环不在执行了</span>
    &#125;     
&#125;

<span class="comment">// 练习 </span>
<span class="comment">//   3人 余2人; 5人 余4人；7人 余6人；9人 余8人;11人正好 问最少多少人？</span>
<span class="comment">//  0 1 2 3</span>
<span class="keyword">for</span>(<span class="keyword">var</span> i =<span class="number">0</span>;i&lt;<span class="number">9999</span>;i++)&#123;
    <span class="keyword">if</span>(i%<span class="number">3</span>==<span class="number">2</span> &amp;&amp; i%<span class="number">5</span>==<span class="number">4</span> &amp;&amp; i%<span class="number">7</span>==<span class="number">6</span> &amp;&amp; i%<span class="number">9</span>==<span class="number">8</span> &amp;&amp; i%<span class="number">11</span>==<span class="number">0</span>)&#123;
        <span class="variable language_">console</span>.<span class="title function_">log</span>(i) <span class="comment">//最少2519 </span>
    &#125;
&#125;</code></pre>

<h3 id="do…while"><a href="#do…while" class="headerlink" title="do…while"></a>do…while</h3><pre><code class="highlight js"><span class="keyword">for</span>(<span class="keyword">var</span> i = <span class="number">0</span>;i&lt;<span class="number">3</span>;i++)&#123;&#125;
<span class="comment">// 先判断 再执行</span>
<span class="comment">// while() 当条件成立了 执行&#123;&#125;</span>
<span class="keyword">var</span> a = <span class="number">0</span>
<span class="keyword">while</span>(a&lt;<span class="number">3</span>)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(a,<span class="string">&quot;11111&quot;</span>)
    a++
&#125;

<span class="keyword">var</span> b = <span class="number">3</span>
<span class="comment">// 现执行再判断，最起码执行一次</span>
<span class="keyword">do</span> &#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;bbbbbbb&quot;</span>)
&#125; <span class="keyword">while</span> (b&lt;<span class="number">3</span>);


<span class="comment">// true 死循环</span>
<span class="comment">// while(1)&#123;</span>
<span class="comment">//     console.log(&quot;111111&quot;)</span>
<span class="comment">// &#125;</span></code></pre>
<h3 id="continue和break"><a href="#continue和break" class="headerlink" title="continue和break"></a>continue和break</h3><p><code>contine</code> : 结束本次循环 执行下次循环<br><code>breake</code> : 跳出循环</p>
<pre><code class="highlight js"><span class="comment">/*</span>
<span class="comment">for(var i = 0;i&lt;10;i++)&#123;</span>
<span class="comment">    console.log(i)  //0-9</span>
<span class="comment">    if(i&gt;5)&#123;</span>
<span class="comment">        continue // 结束本次循环，执行下次循环</span>
<span class="comment">    &#125;</span>
<span class="comment">&#125;</span>
<span class="comment"></span>
<span class="comment">for(var i = 0;i&lt;10;i++)&#123;</span>
<span class="comment">    </span>
<span class="comment">    if(i&gt;5)&#123;</span>
<span class="comment">        continue // 继续循环， 结束本次循环，执行下次循环</span>
<span class="comment">        console.log(i,&quot;---------------&quot;)  //没打印</span>
<span class="comment">    &#125;</span>
<span class="comment">&#125;</span>
<span class="comment"></span>
<span class="comment"></span>
<span class="comment">for(var i = 0;i&lt;10;i++)&#123;</span>
<span class="comment">    if(i&gt;5)&#123;</span>
<span class="comment">        console.log(i,&quot;++++++++++&quot;) // 6 7 8 9 </span>
<span class="comment">        continue // 继续循环， 结束本次循环，执行下次循环     </span>
<span class="comment">    &#125;</span>
<span class="comment">&#125;</span>
<span class="comment"></span>
<span class="comment">for(var i = 0;i&lt;10;i++)&#123;</span>
<span class="comment">    console.log(i,&quot;=======&quot;) // 0 1 2 3 4 5 6  7 8 9</span>
<span class="comment">    if(i&lt;5)&#123;</span>
<span class="comment">        console.log(i,&quot;dddddddddddddddddddd&quot;) // 0 1 2 3 4</span>
<span class="comment">        continue // 继续循环， 结束本次循环，执行下次循环    </span>
<span class="comment"></span>
<span class="comment">    &#125;</span>
<span class="comment">&#125;</span>
<span class="comment"></span>
<span class="comment">for(var i = 0;i&lt;10;i++)&#123;</span>
<span class="comment">    if(i&lt;5)&#123;</span>
<span class="comment">        continue // 继续循环， 结束本次循环，执行下次循环    </span>
<span class="comment">    &#125;</span>
<span class="comment">    console.log(i,&quot;????????????????????????????????????&quot;)//56789</span>
<span class="comment">&#125;</span>
<span class="comment">*/</span>
<span class="keyword">for</span>(<span class="keyword">var</span> i = <span class="number">0</span>; i&lt;<span class="number">10</span>;i++)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(i,<span class="string">&quot;jjjjjjjjjjjjjjjjj&quot;</span>); <span class="comment">// 0</span>
    <span class="keyword">break</span>
        <span class="comment">// 跳出循环 后面代码不执行</span>
    <span class="variable language_">console</span>.<span class="title function_">log</span>(i,<span class="string">&quot;hhhhhhhhhhhhhhh&quot;</span>)
&#125;



<span class="keyword">for</span>(<span class="keyword">var</span> i = <span class="number">0</span>;i&lt;<span class="number">10</span>;i++)&#123;
<span class="keyword">if</span>(i&lt;<span class="number">5</span>)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;a&#x27;</span>,i)  <span class="comment">// 0 1 2 3 4</span>
    <span class="keyword">continue</span>
&#125;
<span class="keyword">if</span>(i&gt;<span class="number">5</span>)&#123;
    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;b&quot;</span>,i) <span class="comment">// 6</span>
    <span class="keyword">break</span>
&#125;
<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;c&#x27;</span>,i) <span class="comment">//5</span>
&#125;</code></pre>

<h2 id="运算符"><a href="#运算符" class="headerlink" title="运算符"></a>运算符</h2><p><code>+</code> : 相加<br><code>-</code> :相减<br><code>/</code> : 除以 带小数<br><code>%</code> : 求余数<br><code>+=</code> : i +&#x3D; 1  等同于  i &#x3D; i + 1<br><code>-=</code> : i -&#x3D; 1  等同于  i &#x3D; i - 1<br><code>*=</code> : i *&#x3D; 1  等同于  i &#x3D; i * 1<br><code>/=</code> : i &#x2F;&#x3D; 1  等同于  i &#x3D; i &#x2F; 1<br><code>%=</code> : i %&#x3D; 1  等同于  i &#x3D; i % 1</p>
<p><code>++ </code> 在前 先加后赋值 ； <code>++</code>在后 先赋值在加1 </p>
<h3 id="i的结果"><a href="#i的结果" class="headerlink" title="++i的结果"></a>++i的结果</h3><p><code>var  i = 10 var a = ++i</code></p>
<p>a &#x3D; 11<br>i &#x3D; 11</p>
<h3 id="i-的结果"><a href="#i-的结果" class="headerlink" title="i++的结果"></a>i++的结果</h3><p><code>var a = i++</code></p>
<p>a &#x3D; 10 i&#x3D;11</p>
<p><em><code>- -i</code> 和 <code>i- -</code>也是一样</em></p>
<h3 id="比较运算符号"><a href="#比较运算符号" class="headerlink" title="比较运算符号"></a>比较运算符号</h3><p><code>==</code> 相等 （不比较数据类型，只比较值是否相等）<br><code>===</code> 恒等 （比较数据类型和值是否相等）</p>
<h3 id="逻辑运算符号"><a href="#逻辑运算符号" class="headerlink" title="逻辑运算符号"></a>逻辑运算符号</h3><p><code>&amp;&amp;</code>  多个条件必须同时成立，才为true，否则为false<br><code>||</code>  一个成立结果就是为true，否则为false<br><code>!</code>   取反</p>

        </article>

        
            
  <div class="nexmoe-post-copyright">
    <strong>本文作者：</strong>咔斯Sama<br>
    
    <strong>本文链接：</strong><a href="https://blog.kassama.top/webNotes3.html" title="https:&#x2F;&#x2F;blog.kassama.top&#x2F;webNotes3.html" target="_blank" rel="noopener">https:&#x2F;&#x2F;blog.kassama.top&#x2F;webNotes3.html</a><br>

    
      <strong>版权声明：</strong>本文采用 <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/cn/deed.zh" target="_blank">CC BY-NC-SA 3.0 CN</a> 协议进行许可
    
  </div>


        

        <div class="nexmoe-post-meta nexmoe-rainbow">
    
        <a class="nexmoefont icon-appstore-fill -link" href="/categories/web%E7%AC%94%E8%AE%B0/">web笔记</a>
    
    
        <a class="nexmoefont icon-tag-fill -none-link" href="/tags/HTML/" rel="tag">HTML</a> <a class="nexmoefont icon-tag-fill -none-link" href="/tags/web/" rel="tag">web</a>
    
</div>

    <div class="nexmoe-post-footer">
        <section class="nexmoe-comment">
    <!-- <div class="valine ks-valine-box"></div> -->
<script src='https://lib.baomitu.com/valine/1.5.1/Valine.min.js'></script>
<script>
    // 使用方法 https://valine.js.org/quickstart.html
    new Valine({
        el: '.valine',
        appId: '6Om9oV6sycmCPkRcrF9VR7Vd-gzGzoHsz',
        appKey: 'cas3l5T4L8EkjrOFGsfzD8vM',
        enableQQ: true,
        placeholder: '阁下要说点什么嘛！',
        requiredFields:['nick','mail'],

        emojiCDN: '//cdn.bilicdn.tk/gh/kasisama/ValineCDN@master/',
        // 表情title和图片映射
        emojiMaps: {
            "bilibilitv2": "bilibilitv/[tv_doge].png",
            "bilibilitv3": "bilibilitv/[tv_亲亲].png",
            "bilibilitv4": "bilibilitv/[tv_偷笑].png",
            "bilibilitv5": "bilibilitv/[tv_再见].png",
            "bilibilitv6": "bilibilitv/[tv_冷漠].png",
            "bilibilitv7": "bilibilitv/[tv_发怒].png",
            "bilibilitv8": "bilibilitv/[tv_发财].png",
            "bilibilitv9": "bilibilitv/[tv_可爱].png",
            "bilibilitv10": "bilibilitv/[tv_吐血].png",
            "bilibilitv11": "bilibilitv/[tv_呆].png",
            "bilibilitv12": "bilibilitv/[tv_呕吐].png",
            "bilibilitv13": "bilibilitv/[tv_困].png",
            "bilibilitv14": "bilibilitv/[tv_坏笑].png",
            "bilibilitv15": "bilibilitv/[tv_大佬].png",
            "bilibilitv16": "bilibilitv/[tv_大哭].png",
            "bilibilitv17": "bilibilitv/[tv_委屈].png",
            "bilibilitv18": "bilibilitv/[tv_害羞].png",
            "bilibilitv19": "bilibilitv/[tv_尴尬].png",
            "bilibilitv20": "bilibilitv/[tv_微笑].png",
            "bilibilitv21": "bilibilitv/[tv_思考].png",
            "bilibilitv22": "bilibilitv/[tv_惊吓].png",
            "bilibilitv23": "bilibilitv/[tv_打脸].png",
            "bilibilitv24": "bilibilitv/[tv_抓狂].png",
            "bilibilitv25": "bilibilitv/[tv_抠鼻].png",
            "bilibilitv26": "bilibilitv/[tv_斜眼笑].png",
            "bilibilitv27": "bilibilitv/[tv_无奈].png",
            "bilibilitv28": "bilibilitv/[tv_晕].png",
            "bilibilitv29": "bilibilitv/[tv_流汗].png",
            "bilibilitv30": "bilibilitv/[tv_流泪].png",
            "bilibilitv31": "bilibilitv/[tv_流鼻血].png",
            "bilibilitv32": "bilibilitv/[tv_点赞].png",
            "bilibilitv33": "bilibilitv/[tv_生气].png",
            "bilibilitv34": "bilibilitv/[tv_生病].png",
            "bilibilitv35": "bilibilitv/[tv_疑问].png",
            "bilibilitv36": "bilibilitv/[tv_白眼].png",
            "bilibilitv37": "bilibilitv/[tv_皱眉].png",
            "bilibilitv38": "bilibilitv/[tv_目瞪口呆].png",
            "bilibilitv39": "bilibilitv/[tv_睡着].png",
            "bilibilitv40": "bilibilitv/[tv_笑哭].png",
            "bilibilitv41": "bilibilitv/[tv_腼腆].png",
            "bilibilitv42": "bilibilitv/[tv_色].png",
            "bilibilitv43": "bilibilitv/[tv_调侃].png",
            "bilibilitv44": "bilibilitv/[tv_调皮].png",
            "bilibilitv45": "bilibilitv/[tv_鄙视].png",
            "bilibilitv46": "bilibilitv/[tv_闭嘴].png",
            "bilibilitv47": "bilibilitv/[tv_难过].png",
            "bilibilitv48": "bilibilitv/[tv_馋].png",
            "bilibilitv49": "bilibilitv/[tv_鬼脸].png",
            "bilibilitv50": "bilibilitv/[tv_黑人问号].png",
            "bilibilitv51": "bilibilitv/[tv_鼓掌].png",
            "Heybox1": "Heybox/expression_cube.png",
            "Heybox2": "Heybox/expression_cube_bingbujiandan.png",
            "Heybox3": "Heybox/expression_cube_bizui.png",
            "Heybox4": "Heybox/expression_cube_cangsang.png",
            "Heybox5": "Heybox/expression_cube_dalian.png",
            "Heybox6": "Heybox/expression_cube_doge.png",
            "Heybox7": "Heybox/expression_cube_gandong.png",
            "Heybox8": "Heybox/expression_cube_guai.png",
            "Heybox9": "Heybox/expression_cube_gugu.png",
            "Heybox10": "Heybox/expression_cube_han.png",
            "Heybox11": "Heybox/expression_cube_hbi.png",
            "Heybox12": "Heybox/expression_cube_heirenwenhao.png",
            "Heybox13": "Heybox/expression_cube_huaji.png",
            "Heybox14": "Heybox/expression_cube_jiayou.png",
            "Heybox15": "Heybox/expression_cube_jingya.png",
            "Heybox16": "Heybox/expression_cube_kaixin.png",
            "Heybox17": "Heybox/expression_cube_ku.png",
            "Heybox18": "Heybox/expression_cube_kun.png",
            "Heybox19": "Heybox/expression_cube_kuqi.png",
            "Heybox20": "Heybox/expression_cube_nu.png",
            "Heybox21": "Heybox/expression_cube_penshui.png",
            "Heybox22": "Heybox/expression_cube_qiliang.png",
            "Heybox23": "Heybox/expression_cube_shengqi.png",
            "Heybox24": "Heybox/expression_cube_shuijiao.png",
            "Heybox25": "Heybox/expression_cube_tanqi.png",
            "Heybox26": "Heybox/expression_cube_tanshou.png",
            "Heybox27": "Heybox/expression_cube_tu.png",
            "Heybox28": "Heybox/expression_cube_wa.png",
            "Heybox29": "Heybox/expression_cube_weiqu.png",
            "Heybox30": "Heybox/expression_cube_weixiao.png",
            "Heybox31": "Heybox/expression_cube_wulianku.png",
            "Heybox32": "Heybox/expression_cube_xia.png",
            "Heybox33": "Heybox/expression_cube_xiaocry.png",
            "Heybox34": "Heybox/expression_cube_xihuan.png",
            "Heybox35": "Heybox/expression_cube_xuexi.png",
            "Heybox36": "Heybox/expression_cube_yun.png",
            "Heybox37": "Heybox/expression_cube_zan.png"
        }
    })
    
</script>
</section>
    </div>
</div>


        <div class="nexmoe-post-right">
            <div class="nexmoe-fixed">
              <div class="nexmoe-tool">
                
                
                    
                        <button class="mdui-fab catalog" style="overflow:unset;">
                            <i class="nexmoefont icon-i-catalog"></i>
                            <div class="nexmoe-toc">
                              <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#js%E6%9B%B4%E6%94%B9%E6%A0%B7%E5%BC%8F"><span class="toc-number">1.</span> <span class="toc-text">js更改样式</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B5%81%E7%A8%8B%E6%8E%A7%E5%88%B6%E8%AF%AD%E5%8F%A5"><span class="toc-number">2.</span> <span class="toc-text">流程控制语句</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#if%E5%88%A4%E6%96%AD"><span class="toc-number">2.1.</span> <span class="toc-text">if判断</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Switch%E8%AF%AD%E5%8F%A5"><span class="toc-number">2.2.</span> <span class="toc-text">Switch语句</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%BF%90%E7%AE%97%E7%AC%A6%E5%8F%B7"><span class="toc-number">2.3.</span> <span class="toc-text">运算符号</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#for%E5%BE%AA%E7%8E%AF"><span class="toc-number">2.4.</span> <span class="toc-text">for循环</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#do%E2%80%A6while"><span class="toc-number">2.5.</span> <span class="toc-text">do…while</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#continue%E5%92%8Cbreak"><span class="toc-number">2.6.</span> <span class="toc-text">continue和break</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%BF%90%E7%AE%97%E7%AC%A6"><span class="toc-number">3.</span> <span class="toc-text">运算符</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#i%E7%9A%84%E7%BB%93%E6%9E%9C"><span class="toc-number">3.1.</span> <span class="toc-text">++i的结果</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#i-%E7%9A%84%E7%BB%93%E6%9E%9C"><span class="toc-number">3.2.</span> <span class="toc-text">i++的结果</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%AF%94%E8%BE%83%E8%BF%90%E7%AE%97%E7%AC%A6%E5%8F%B7"><span class="toc-number">3.3.</span> <span class="toc-text">比较运算符号</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%80%BB%E8%BE%91%E8%BF%90%E7%AE%97%E7%AC%A6%E5%8F%B7"><span class="toc-number">3.4.</span> <span class="toc-text">逻辑运算符号</span></a></li></ol></li></ol>
                            </div>
                        </button>
                        
                  
                
                  <a href="#nexmoe-content" class="toc-link" aria-label="回到顶部" title="top"><button class="mdui-fab mdui-ripple"><i class="nexmoefont icon-caret-top"></i></button></a>
                
              </div>
            </div>
        </div>
    </div>
  </div>
  <div id="nexmoe-pendant">
    <div class="nexmoe-drawer mdui-drawer nexmoe-pd" id="drawer">
        
            <div class="nexmoe-pd-item">
                <div class="clock">
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="memory"></div>
        <div class="needle" id="hours"></div>
        <div class="needle" id="minutes"></div>
        <div class="needle" id="seconds"></div>
        <div class="clock_logo">

        </div>

    </div>
<style>
    .clock {
        background-color: #ffffff;
        width: 70vw;
        height: 70vw;
        max-width: 70vh;
        max-height: 70vh;
        border: solid 2.8vw #242424;
        position: relative;
        overflow: hidden;
        border-radius: 50%;
        box-sizing: border-box;
        box-shadow: 0 1.4vw 2.8vw rgba(0, 0, 0, 0.8);
        zoom:0.2
    }

    .memory {
        position: absolute;
        top: 50%;
        left: 50%;
        transform-origin: center;
    }

    .memory:nth-child(1) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(0deg) translateY(-520%);
    }

    .memory:nth-child(2) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(6deg) translateY(-1461%);
    }

    .memory:nth-child(3) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(12deg) translateY(-1461%);
    }

    .memory:nth-child(4) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(18deg) translateY(-1461%);
    }

    .memory:nth-child(5) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(24deg) translateY(-1461%);
    }

    .memory:nth-child(6) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(30deg) translateY(-520%);
    }

    .memory:nth-child(7) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(36deg) translateY(-1461%);
    }

    .memory:nth-child(8) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(42deg) translateY(-1461%);
    }

    .memory:nth-child(9) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(48deg) translateY(-1461%);
    }

    .memory:nth-child(10) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(54deg) translateY(-1461%);
    }

    .memory:nth-child(11) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(60deg) translateY(-520%);
    }

    .memory:nth-child(12) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(66deg) translateY(-1461%);
    }

    .memory:nth-child(13) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(72deg) translateY(-1461%);
    }

    .memory:nth-child(14) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(78deg) translateY(-1461%);
    }

    .memory:nth-child(15) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(84deg) translateY(-1461%);
    }

    .memory:nth-child(16) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(90deg) translateY(-520%);
    }

    .memory:nth-child(17) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(96deg) translateY(-1461%);
    }

    .memory:nth-child(18) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(102deg) translateY(-1461%);
    }

    .memory:nth-child(19) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(108deg) translateY(-1461%);
    }

    .memory:nth-child(20) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(114deg) translateY(-1461%);
    }

    .memory:nth-child(21) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(120deg) translateY(-520%);
    }

    .memory:nth-child(22) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(126deg) translateY(-1461%);
    }

    .memory:nth-child(23) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(132deg) translateY(-1461%);
    }

    .memory:nth-child(24) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(138deg) translateY(-1461%);
    }

    .memory:nth-child(25) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(144deg) translateY(-1461%);
    }

    .memory:nth-child(26) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(150deg) translateY(-520%);
    }

    .memory:nth-child(27) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(156deg) translateY(-1461%);
    }

    .memory:nth-child(28) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(162deg) translateY(-1461%);
    }

    .memory:nth-child(29) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(168deg) translateY(-1461%);
    }

    .memory:nth-child(30) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(174deg) translateY(-1461%);
    }

    .memory:nth-child(31) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(180deg) translateY(-520%);
    }

    .memory:nth-child(32) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(186deg) translateY(-1461%);
    }

    .memory:nth-child(33) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(192deg) translateY(-1461%);
    }

    .memory:nth-child(34) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(198deg) translateY(-1461%);
    }

    .memory:nth-child(35) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(204deg) translateY(-1461%);
    }

    .memory:nth-child(36) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(210deg) translateY(-520%);
    }

    .memory:nth-child(37) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(216deg) translateY(-1461%);
    }

    .memory:nth-child(38) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(222deg) translateY(-1461%);
    }

    .memory:nth-child(39) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(228deg) translateY(-1461%);
    }

    .memory:nth-child(40) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(234deg) translateY(-1461%);
    }

    .memory:nth-child(41) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(240deg) translateY(-520%);
    }

    .memory:nth-child(42) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(246deg) translateY(-1461%);
    }

    .memory:nth-child(43) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(252deg) translateY(-1461%);
    }

    .memory:nth-child(44) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(258deg) translateY(-1461%);
    }

    .memory:nth-child(45) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(264deg) translateY(-1461%);
    }

    .memory:nth-child(46) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(270deg) translateY(-520%);
    }

    .memory:nth-child(47) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(276deg) translateY(-1461%);
    }

    .memory:nth-child(48) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(282deg) translateY(-1461%);
    }

    .memory:nth-child(49) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(288deg) translateY(-1461%);
    }

    .memory:nth-child(50) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(294deg) translateY(-1461%);
    }

    .memory:nth-child(51) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(300deg) translateY(-520%);
    }

    .memory:nth-child(52) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(306deg) translateY(-1461%);
    }

    .memory:nth-child(53) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(312deg) translateY(-1461%);
    }

    .memory:nth-child(54) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(318deg) translateY(-1461%);
    }

    .memory:nth-child(55) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(324deg) translateY(-1461%);
    }

    .memory:nth-child(56) {
        background-color: #424242;
        width: 2%;
        height: 8%;
        transform: translate(-50%, -50%) rotate(330deg) translateY(-520%);
    }

    .memory:nth-child(57) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(336deg) translateY(-1461%);
    }

    .memory:nth-child(58) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(342deg) translateY(-1461%);
    }

    .memory:nth-child(59) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(348deg) translateY(-1461%);
    }

    .memory:nth-child(60) {
        background-color: #949494;
        width: 1%;
        height: 3%;
        transform: translate(-50%, -50%) rotate(354deg) translateY(-1461%);
    }

    .needle {
        position: absolute;
        top: 50%;
        left: 50%;
        transform-origin: center;
    }

    .needle#hours {
        background-color: #1f1f1f;
        width: 4%;
        height: 30%;
        transform-origin: center 75%;
        transform: translate(-50%, -75%);
    }

    .needle#hours.moving {
        transition: transform 150ms ease-out;
    }

    .needle#hours:after {
        content: '';
        background-color: #1f1f1f;
        width: 4vw;
        height: 4vw;
        max-width: 4vh;
        max-height: 4vh;
        display: block;
        position: absolute;
        top: 75%;
        left: 50%;
        box-sizing: border-box;
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }

    .needle#minutes {
        background-color: #1f1f1f;
        width: 2%;
        height: 45%;
        transform-origin: center 75%;
        transform: translate(-50%, -75%);
    }

    .needle#minutes.moving {
        transition: transform 150ms ease-out;
    }

    .needle#minutes:after {
        content: '';
        background-color: #1f1f1f;
        width: 4vw;
        height: 4vw;
        max-width: 4vh;
        max-height: 4vh;
        display: block;
        position: absolute;
        top: 75%;
        left: 50%;
        box-sizing: border-box;
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }

    .needle#seconds {
        background-color: #cb2f2f;
        width: 1%;
        height: 50%;
        transform-origin: center 75%;
        transform: translate(-50%, -75%);
    }

    .needle#seconds.moving {
        transition: transform 150ms ease-out;
    }

    .needle#seconds:after {
        content: '';
        background-color: #cb2f2f;
        width: 2.5vw;
        height: 2.5vw;
        max-width: 2.5vh;
        max-height: 2.5vh;
        display: block;
        position: absolute;
        top: 75%;
        left: 50%;
        box-sizing: border-box;
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }
    .clock_logo{
        width: 10vw;
        height: 10vw;
        max-width: 10vh;
        max-height: 10vh;
        position: absolute;
        top: 50%;
        left: 50%;
        box-sizing: border-box;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        background-size: 100% 100%;
        background-repeat: no-repeat;
    }
    @media (min-width: 100vh) {
        .clock {
            border: solid 2.8vh #242424;
            box-shadow: 0 1.4vh 2.8vh rgba(0, 0, 0, 0.8);
        }
    }

</style>





            </div>
        
            <div class="nexmoe-pd-item">
                <div class="qweather" >
    <div id="he-plugin-standard"></div>
    <div class="qweather-logo">

    </div>

</div>
<style>
    .qweather{
        position: relative;
    }
    .qweather-logo{
        position: absolute;
        right: 0;
        top: -15px;
        width: 40px;
        height: 40px;
        background-size: 100% 100%;
        background-repeat: no-repeat;
    }
</style>
<script>
  WIDGET = {
    "CONFIG": {
      "layout": "2",
      "width": "260",
      "height": "220",
      "background": "5",
      "dataColor": "0099FF",
      "borderRadius": "15",
      "key": "06114923535c446ea84c203a5e492a41"
    }
  }
</script>
<script src="https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0"></script>

            </div>
        
</div>
<style>
    .nexmoe-pd {
        left: auto;
        top: 40px;
        right: 0;
    }
    .nexmoe-pd-item{
       display: flex;
        justify-content: center;
        margin-bottom: 30px;
    }
</style>

  </div>
  <script src="https://cdn.jsdelivr.net/combine/npm/lazysizes@5.1.0/lazysizes.min.js,gh/highlightjs/cdn-release@9.15.8/build/highlight.min.js,npm/mdui@0.4.3/dist/js/mdui.min.js?v=1"></script>
<script>
	hljs.initHighlightingOnLoad();
</script>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>


<script src="/js/app.js?v=1695462045756"></script>

<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.8.1/dist/js/jquery.justifiedGallery.min.js"></script>
<script>
	$(".justified-gallery").justifiedGallery({
		rowHeight: 160,
		margins: 10,
	});
</script>

  





<!-- hexo injector body_end start -->
<script src="/js/clock.js"></script>

<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>

<script src="/lib/codeBlock/codeBlockFuction.js"></script>

<script src="/lib/codeBlock/codeLang.js"></script>

<script src="/lib/codeBlock/codeCopy.js"></script>

<script src="/lib/codeBlock/codeShrink.js"></script>

<link rel="stylesheet" href="/lib/codeBlock/matery.css">

<script src="https://code.jquery.com/jquery-3.6.0.js"></script>

<script src="/js/search.js"></script>

<script src="/js/webapp.js"></script>
<!-- hexo injector body_end end --><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/live2dw/assets/assets/rem.model.json"},"display":{"position":"left","width":400,"height":400},"mobile":{"show":true,"scale":0.5},"react":{"opacityDefault":0.7,"opacityOnHover":0.8},"log":false});</script></body>
</html>

<script>(function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/f90b2d50.js","daovoice")</script>
<script>
  daovoice('init', {
    app_id: "f90b2d50"
  });
  daovoice('update');
</script>

